/*
 * Copyright (c) 2025 iSOFT INFRASTRUCTURE SOFTWARE CO., LTD.
 * easyAda is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */

#include <arch/scr.h>
#include <core/dprintf.h>
#include <core/mm.h>
#include <core/schedule.h>
#include <core/task.h>
#include <caps/capability.h>
#include <caps/cnode.h>
#include <caps/signal.h>
#include <uapi/errors.h>
#include <uapi/ipcops.h>

void cap_signal_dispatcher(capability_t *cap, unsigned long tag, unsigned long m0, unsigned long m1, unsigned long m2,
                           unsigned long m3, unsigned long m4, unsigned long m5)
{
    op_signal_param_t *cfg = ipcbuffer_get_op_struct(task_get_ipcbuffer(current()));

    sig_handle(m0, cfg);
}